#ifndef CLIENT_FILE_H
#define CLIENT_FILE_H

#include <QWidget>
#include <QTcpSocket>
#include <QFile>
#include <QTimer>
#include <QTime>
namespace Ui {
class client_file;
}

class client_file : public QWidget
{
    Q_OBJECT

public:
    explicit client_file(QWidget *parent = 0,QString IP="");
    ~client_file();
private slots:

    void RcvFile();

    void on_pushButton_connect_clicked();

private:
    Ui::client_file *ui;
    QString server_IP;
    quint16 port;
    QFile file;
    QTcpSocket *tcpSocket;
    QString fileName;
    qint64 fileSize;
    qint64 rcvSize;
    QTime mTime;
    int last_time = 0;
    bool isStart = true;
};

#endif // CLIENT_FILE_H
